package com.order.feign;

import com.aaa.entity.TProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// fallback 处理熔断
@FeignClient(value = "product",fallback = ProductFeignImpl.class)
public interface ProductFeign {
    // product 服务里面的路径  是什么
    @GetMapping("/pro/{id}") //  pro/1
    // 找到这个方法
    TProduct getByProId(@PathVariable Integer id);
}
